const express = require('express')
const app = express()


const test = require('../smzdm').main

app.get('/api/test', (req, res, next) => {
  // 将 req.query 传入
  test(req.query).then(res.json.bind(res)).catch((e) => {
    console.error(e)
    next(e)
  })
  // next()
})



app.listen(3000, () => {
  console.log(`开发服务器启动成功：http://127.0.0.1:3000`)
})